package com.settlement.system.mapper;

import com.settlement.system.model.entity.common.TblRrVoucherType;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 收退款-凭证类型 Mapper 接口
 * @author Ximi
 * @since 2020-07-06
 */
public interface TblRrVoucherTypeMapper extends BaseMapper {

    /**
     * 根据凭证类型获取数据
     *
     * @param voucherType
     * @param notVoucherTypeNo
     * @return
     */
    TblRrVoucherType getByVoucherType(@Param("voucherType") String voucherType, @Param("notVoucherTypeNo") String notVoucherTypeNo);


    /**
     * 根据 排序 获取数据
     * @param sort
     * @return
     */
    TblRrVoucherType getBySort(@Param("sort") String sort);

    TblRrVoucherType getByVoucherTypeAndNotShareOrNot(@Param("voucherType") String voucherType,
                                                   @Param("shareOrNot") String shareOrNot);

    TblRrVoucherType getByVoucherTypeAndNotBeforeOrAfterTicket(@Param("voucherType") String voucherType,
                                                            @Param("beforeOrAfterTicket") String beforeOrAfterTicket);

    /**
     * 用于全参数判断
     * @param params
     * @return
     */
    List<TblRrVoucherType> selectByParams(@Param("params") TblRrVoucherType params);

    String getShareOrNotByVoucherType(@Param("voucherType") String voucherType);

    String getBeforeOrAfterTicketByVoucherType(@Param("voucherType") String voucherType);
}

